package com.gr100.biz.kit.cmd;

import java.io.File;

import com.gr100.biz.api.bo.MetaObject;

public abstract class AbsCmdCallback implements CmdCallback {

	protected MetaObject fRecord;
	public AbsCmdCallback(MetaObject fRecord){
		this.fRecord = fRecord;
	}
	@Override
	public void success() {
		
    	new Thread(new Runnable(){
			@Override
			public void run() {
				final String path = AbsCmdCallback.this.fRecord.getStr("path");
				final String name = AbsCmdCallback.this.fRecord.getStr("name");
				File f = new File(path);
				//文件不存在，则跳出
				if(!f.exists()){
					return;
				}
//				try {
//					Document.me().save(Document.folder+"/"+name, fRecord);
//				} catch (DocumentSaveHex e) {
//					e.printStackTrace();
//				}
			}
    		
    	}).start();
	}

}
